Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: calfw-org: Ensure that string-match does not get nil input #155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vedang
Copy link

@vedang vedang commented Jan 21, 2023

With the following customization:

    (setq cfw:org-agenda-schedule-args
          '(:deadline :scheduled :timestamp))

M-x cfw:open-org-calendar fails to render. This happens because the functions cfw:org-summary-format and cfw:org-get-timerange do not guard against text properties being nil when calling string-match.

This commit adds the guard, which leads to the calendar rendering correctly.

With the following customization:

```elisp
    (setq cfw:org-agenda-schedule-args
          '(:deadline :scheduled :timestamp))
```

`M-x cfw:open-org-calendar` fails to render. This happens because the
functions `cfw:org-summary-format` and `cfw:org-get-timerange` do not
guard against text properties being nil when calling `string-match`.

This commit adds the guard, which leads to the calendar rendering
correctly.
vedang added a commit to vedang/calfw-blocks that referenced this pull request Jan 21, 2023
`string-match` cannot handle nil. Adding this guard allows calfw to work
correctly again. A similar fix is needed in `emacs-calfw` as well and
has been contributed at kiwanami/emacs-calfw#155.
vedang added a commit to vedang/emacs-up that referenced this pull request Jan 23, 2023
Visually looking at the day gives a far more visceral understanding of
what you plan to do today.

Note that I am using personal recipes for both these projects, until
the fixes I've made can be merged upstream. The relevant PRs are:

- kiwanami/emacs-calfw#154
- kiwanami/emacs-calfw#155
- ml729/calfw-blocks#1
- ml729/calfw-blocks#2
@saviola777
Copy link

Thank you, this PR fixed an issue that recently started happening where I'd get an error when trying to open the calfw calendar. 👍 I do not have the customization you mentioned (the variable is nil), so I'm not sure what exactly triggered it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants